package com.deimos.dataBase;

import java.util.Date;
import org.vast.ows.sps.StatusReport.RequestStatus;
import org.vast.ows.sps.StatusReport.TaskStatus;

import com.deimos.sps.GetFeasibility.Operation;

public class Event {
    /*public static final String DATA_PUBLISED = "DATA_PUBLISED";
    public static final String RESERVATION_EXPIRED = "RESERVATION_EXPIRED";
    public static final String TASK_CANCELLED = "TASK_CANCELLED";
    public static final String TASK_COMPLETED = "TASK_COMPLETED";
    public static final String TASK_FAILED = "TASK_FAILED";
    public static final String TASKING_REQUEST_EXPIRED = "TASKING_REQUEST_EXPIRED";
    public static final String TASK_RESERVED = "TASK_RESERVED";
    public static final String TASK_SUBMITTED = "TASK_SUBMITTED";
    public static final String TASK_UPDATED = "TASK_UPDATED";
    public static final String TASK_CONFIRMED = "TASK_CONFIRMED";
    public static final String TASK_STUDIED = "TASK_STUDIED";*/
  
    private boolean acquisitionSuccess;
    private String acquisitionSuccessDescription;
    private Integer eventId;
    private RequestStatus requestStatus;
    private TaskStatus taskStatus;
    private Date updateDate;
    private Boolean feasibilityStudy;
    private Date expirationDate;
    private Date estimatedToC;
    private Date beginDate;
    private Date endDate;
    private Task task;
    private String responseParameters;
    private String requestParameters;
    private java.lang.String description;
    private Operation operation;
    private double maxCloud;

    // constructor
    public Event() {
    }

    
    
    /**
     * @return the maxCloud
     */
    public double getMaxCloud() {
        return maxCloud;
    }



    /**
     * @param maxCloud the maxCloud to set
     */
    public void setMaxCloud(double maxCloud) {
        this.maxCloud = maxCloud;
    }



    /**
     * @return the operation
     */
    public Operation getOperation() {
        return operation;
    }



    /**
     * @param operation the operation to set
     */
    public void setOperation(Operation operation) {
        this.operation = operation;
    }



    /**
     * @return the acquisitionSuccess
     */
    public boolean isAcquisitionSuccess() {
        return acquisitionSuccess;
    }

    /**
     * @param acquisitionSuccess the acquisitionSuccess to set
     */
    public void setAcquisitionSuccess(boolean acquisitionSuccess) {
        this.acquisitionSuccess = acquisitionSuccess;
    }

    /**
     * @return the acquisitionSuccessDescription
     */
    public String getAcquisitionSuccessDescription() {
        return acquisitionSuccessDescription;
    }

    /**
     * @param acquisitionSuccessDescription the acquisitionSuccessDescription to set
     */
    public void setAcquisitionSuccessDescription(String acquisitionSuccessDescription) {
        this.acquisitionSuccessDescription = acquisitionSuccessDescription;
    }

    public Date getBeginDate() {
	return beginDate;
    }

    public void setBeginDate(Date beginDate) {
	this.beginDate = beginDate;
    }

    public Date getEndDate() {
	return endDate;
    }

    public void setEndDate(Date endDate) {
	this.endDate = endDate;
    }

    public java.lang.String getDescription() {
	return description;
    }

    public void setDescription(java.lang.String description) {
	this.description = description;
    }

    public String getResponseParameters() {
	return responseParameters;
    }

    public void setResponseParameters(String responseParameters) {
	this.responseParameters = responseParameters;
    }
    
    

    /**
     * @return the requestParameters
     */
    public String getRequestParameters() {
        return requestParameters;
    }



    /**
     * @param requestParameters the requestParameters to set
     */
    public void setRequestParameters(String requestParameters) {
        this.requestParameters = requestParameters;
    }



    public Date getEstimatedToC() {
	return estimatedToC;
    }

    public void setEstimatedToC(Date estimatedToC) {
	this.estimatedToC = estimatedToC;
    }

    public com.deimos.dataBase.Task getTask() {
	return task;
    }

    public void setTask(com.deimos.dataBase.Task task) {
	this.task = task;
    }

    public Date getExpirationDate() {
	return expirationDate;
    }

    public void setExpirationDate(Date expirationDate) {
	this.expirationDate = expirationDate;
    }

    public java.lang.Integer getEventId() {
	return eventId;
    }

    public void setEventId(java.lang.Integer eventId) {
	this.eventId = eventId;
    }

    /**
     * @return the requestStatus
     */
    public RequestStatus getRequestStatus() {
        return requestStatus;
    }

    /**
     * @param requestStatus the requestStatus to set
     */
    public void setRequestStatus(RequestStatus requestStatus) {
        this.requestStatus = requestStatus;
    }

    /**
     * @return the taskStatus
     */
    public TaskStatus getTaskStatus() {
        return taskStatus;
    }

    /**
     * @param taskStatus the taskStatus to set
     */
    public void setTaskStatus(TaskStatus taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Date getUpdateDate() {
	return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
	this.updateDate = updateDate;
    }

    public java.lang.Boolean getFeasibilityStudy() {
	return feasibilityStudy;
    }

    public void setFeasibilityStudy(java.lang.Boolean feasibilityStudy) {
	this.feasibilityStudy = feasibilityStudy;
    }
    
    public static boolean compare(String requestFeasibilityParameters, String newParameters){
	try {
	    requestFeasibilityParameters = requestFeasibilityParameters.replaceAll("<[^>]*>", "");
	    newParameters = newParameters.replaceAll("<[^>]*>", "");
	    return requestFeasibilityParameters.compareTo(newParameters) == 0;
	} catch (Exception e) {
	}
	
	return false;
    }

}
